# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-osprey
pkgver=9
pkgrel=0
pkgdesc="Motorola Moto G 2015"
url="https://postmarketos.org"
arch="aarch64"
license="MIT"
depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916
	 soc-qcom-msm8916 soc-qcom-msm8916-rproc"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
options="!check !archcheck"
_pmb_select="soc-qcom-msm8916-rproc"

subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
	# osprey can use newer venus firmware from harpia
	depends="firmware-qcom-adreno-a300 msm-firmware-loader
		 firmware-motorola-osprey-wcnss-nv firmware-motorola-harpia-venus"
	mkdir "$subpkgdir"
}

sha512sums="
d5a16ed4ea27f48c304bf40aeb0c58aca982c74265996edf0ed6e7f3a9a77a9f00f32bf14e0b10ef50411689b698bb520d8bf315a52e5bbdd906a8f5abea270a  deviceinfo
fc1d1e57bd2a366884b1359ba32acfb484719958fb655067cfba28787384d626dde7683750dda523e2941df4fc78e2d234130ef5a5217002a09623a4a2f34919  modules-initfs
"
